import axios from '@/utils/request'
export const CheckOrder = (mode, obj) => {
  return axios.get('/checkout/order', {
    params: {
      mode,
      delivery: 0,
      shopId: 0,
      couponId: 0,
      isUsePoints: 0,
      ...obj
    }
  })
}
export const SubOrder = (mode, remark, obj) => {
  return axios.post('/checkout/submit', {
    delivery: 10,
    couponId: 0,
    isUsePoints: 0,
    mode,
    payType: 10,
    remark,
    ...obj
  })
}
export const todoCounts = () => {
  return axios.get('/order/todoCounts')
}
export const getOrderList = (dataType) => {
  return axios.get('/order/list', {
    params: {
      dataType,
      page: 1
    }
  })
}
export const cancelOrder = (orderId) => {
  return axios.post('/order/cancel', {
    orderId
  })
}
